// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
thread 'NFSHUD_MP3'

//quick setting
const
//raitio
RMP_ratio = 2.7
Speed_ratio = 5.5
image_Gear_6 = 310 //speed
//systems 1/0 on/off (for SA:MP player : please All off!
Speed_Breaker = 1 //12@ ( 0=off 1=on
//set meter speed & reset speed
Set_Speed = 500 //14@ (0~1000
//REWARD Show time
REWARD_WAIT = 5000 //28@ (3000~8000
end
 
0000: NOP
0AAC: 5@ = load_mp3 "CLEO\mp3\NFSHUD01.mp3"
0AAC: 6@ = load_mp3 "CLEO\mp3\NFSHUD02.mp3"
$532 = 0
$533 = 0  

//Player Check
:NFSHUD_15
wait 0
if and
0AB0:   key_pressed 96
0AB0:   key_pressed 97
then
    if
    17@ == 0
    then
        17@ = 1
        03E5: show_text_box 'NFS_OFF'
    else
        17@ = 0
        03E5: show_text_box 'NFS_ON'
    end
    018C: play_sound 1058 at 0.0 0.0 0.0
    wait 1000    
end
if
17@ == 0
else_jump @NFSHUD_15
if and
   Actor.Driving($PLAYER_ACTOR)
  $ACTIVE_INTERIOR == 0 
84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 
84A7:   not actor $PLAYER_ACTOR driving_boat 
else_jump @NFSHUD_15 
if or
0741:   actor $PLAYER_ACTOR busted 
   Actor.Dead($PLAYER_ACTOR)
then
    jump @NFSHUD_15
else
    jump @NFSHUD_80
end
jump @NFSHUD_15  

//Start up(Load TXD)
:NFSHUD_80
wait 0
14@ = Set_Speed
03C7: set_sensitivity_to_crime_to 2.0
0811: 1@ = actor $PLAYER_ACTOR car // versionC 
0390: load_txd_dictionary "NFSHUD" 
038F: load_texture "STRELK" as 15 // Load dictionary with 0390 first 
038F: load_texture "CIF" as 16 // Load dictionary with 0390 first
038F: load_texture "HURRYUP" as 17 // Load dictionary with 0390 first
if
16@ == 0
then
    16@ = 800
end
11@ = 0
// 
wait 14@ 
jump @NFSHUD_166 

//Player Check (Car)
:NFSHUD_166
wait 0 
if and
   Actor.Driving($PLAYER_ACTOR)
  $ACTIVE_INTERIOR == 0 
else_jump @NFSHUD_919 
if or
0741:   actor $PLAYER_ACTOR busted 
   Actor.Dead($PLAYER_ACTOR)
else_jump @NFSHUD_221 
jump @NFSHUD_902 

//Key
:NFSHUD_221
if 
0AB0:   key_pressed 71 
else_jump @NFSHUD_103
jump @NFSHUD_902

:NFSHUD_103
if 
0AB0:   key_pressed 66 
else_jump @NFSHUD_104 
jump @NFSHUD_100

:NFSHUD_104
if
0AB0:   key_pressed 67
else_jump @NFSHUD_276
jump @NFSHUD_105 

//Meter
:NFSHUD_276
11@ += 1
02E3: 2@ = car 1@ speed
02E3: 8@ = car 1@ speed
8@ *= Speed_ratio 
0092: 8@ = float 8@ to_integer 
2@ *= RMP_ratio 
0AB8: get_vehicle 1@ current_gear_to 3@
if
16@ >= 799
then
    if
    11@ == 100
    then 
        16@ += 5
        11@ = 0
    end
else
    if
    11@ == 10
    then 
        16@ += 5
        11@ = 0
    end
end 
//RPM (NO Edit!!)////////////////////////////////////////////////////////////////////////////////
if or
    3@ == 0
    2@ == 0
then
    {0340: set_text_draw_RGBA 255 0 0 128
    if
        2@ >= 1
    then
        033E: set_draw_text_position 475.0 360.0 GXT '_NFSHUD_R'
    end
    if
        2@ == 0
    then
        033E: set_draw_text_position 475.0 360.0 GXT '_NFSHUD_N'
    else
        033E: set_draw_text_position 475.0 360.0 GXT '_NFSHUD_N'
    end}
    ////////////////////////////////////////////////////////////////////////////////////
    3@ = 1
    081C: draw_text_outline 0 RGBA 0 150 255 128
    045A: draw_text_1number 475.0 360.0 GXT 'NUMBER' number 3@  // ~1~
else
//RPM Setting///////////////////////////////////////////////////////////////////////////
    081C: draw_text_outline 0 RGBA 0 150 255 128
    if
        3@ == 1     //Gear 1
    then
        2@ *= 5.2
        045A: draw_text_1number 475.0 360.0 GXT 'NUMBER' number 3@  // ~1~
    end
    if
        3@ == 2     //Gear 2
    then
        2@ *= 3.0
        045A: draw_text_1number 475.0 360.0 GXT 'NUMBER' number 3@  // ~1~
    end
    if
        3@ == 3     //Gear 3
    then
        2@ *= 2.1
        045A: draw_text_1number 475.0 360.0 GXT 'NUMBER' number 3@  // ~1~
    end
    if
        3@ == 4     //Gear 4
    then
        2@ *= 1.6
        045A: draw_text_1number 475.0 360.0 GXT 'NUMBER' number 3@  // ~1~
    end
    if and
        3@ == 5     //Gear 5
        8@ >= image_Gear_6
    then
        2@ *= 1.2
        3@ = 6
        045A: draw_text_1number 475.0 360.0 GXT 'NUMBER' number 3@  // ~1~
    else
        if
            3@ == 5     //Gear 5
        then
            2@ *= 1.4
            045A: draw_text_1number 475.0 360.0 GXT 'NUMBER' number 3@  // ~1~
        end
    end         
end
//Show Meter and Icons(NO Edit)/////////////////////////////////////////////////////////////////////////////////////////////////////// 
03F0: enable_text_draw 0 
03E3: set_texture_to_be_drawn_antialiased 1 
038D: draw_texture 16 position 480.0 380.0 size 241.0 220.0 RGBA 255 255 255 255 
03E3: set_texture_to_be_drawn_antialiased 1 
074B: draw_texture 15 position 480.0 380.0 scale 241.0 220.0 angle 2@ color_RGBA 255 255 255 255
//for Racing Pack Navi////////////////////////////////////////////////////////////////////////////
//Navi "HURRY UP!!"    
if
$532 >= 1
then
    21@ = 1
    008B: 22@ = $532
    if
    $532 <= 10000
    then
        03E3: set_texture_to_be_drawn_antialiased 1
        038D: draw_texture 17 position 320.0 180.0 size 241.0 110.0 RGBA 0 255 255 255
    end
end
// Bonus "REWARD"
if and
    21@ == 1
    $532 == 0
then
    22@ /= 10.0
    wait 0
    Player.Money($PLAYER_CHAR) += 22@
    01E3: show_text_1number_styled GXT 'REWARD' number 22@ time 28@ style 1  // Price
    wait REWARD_WAIT
    21@ = 0
end    
//Digital Speed Meter/////////////////////////////////////////////////////////////////// 
081C: draw_text_outline 0 RGBA 0 150 255 128 
045A: draw_text_1number 465.0 410.0 GXT 'NUMBER' number 8@  // ~1~
081C: draw_text_outline 0 RGBA 0 150 255 128
045A: draw_text_1number 485.0 430.0 GXT 'NUMBER' number 16@  // ~1~
03F0: enable_text_draw 0
jump @NFSHUD_166

//Speed Breaker Startup 01 ("B"Key)
:NFSHUD_100
wait 0
12@ = Speed_Breaker
if and
    12@ == 1
    16@ >= 49
else_Jump @NFSHUD_276    
099C: jiggle_camera type 1 duration 5000.0 intensity 6.0
02A3: set_widescreen 1 
wait 0
03F0: enable_text_draw 0 
0391: release_txd_dictionary
wait 0
0AAD: set_mp3 5@ perform_action 1
015D: set_gamespeed 0.3
01EC: make_car 1@ very_heavy 1
jump @NFSHUD_1001

:NFSHUD_1001
if
    047A: is_char $PLAYER_ACTOR driving_a_motorbike
    then
    0423: set_vehicle 1@ improved_handling_to 25.0 ;float //Bike Handling Up
    else
    0423: set_vehicle 1@ improved_handling_to 5.0 ;float  //Car Handling Up
end
16@ -= 50
wait 500
jump @NFSHUD_101

//Speed Breaker Running
:NFSHUD_101
wait 0
02E3: 2@ = car 1@ speed
16@ -= 1
2@ *= Speed_ratio
0092: 2@ = float 2@ to_integer
081C: draw_text_outline 0 RGBA 0 150 255 128
03F0: enable_text_draw 0
045A: draw_text_1number 485.0 430.0 GXT 'NUMBER' number 16@  // ~1~
if or 
    0AB0:   key_pressed 66
    2@ <= 60
    2@ >= 320
    16@ == 0 
else_jump @NFSHUD_101
if
16@ == 0
then
    16@ = 10
end     
jump @NFSHUD_102

//Speed Breaker END
:NFSHUD_102
11@ = 0
0AAD: set_mp3 5@ perform_action 0
099C: jiggle_camera type 1 duration 100.0 intensity 0.0
wait 0
0AAD: set_mp3 6@ perform_action 1
015D: set_gamespeed 0.7
01EC: make_car 1@ very_heavy 0
0423: set_vehicle 1@ improved_handling_to 1.0 ;float
03F0: enable_text_draw 0
jump @NFSHUD_1021

:NFSHUD_1021
wait 1500
02A3: set_widescreen 0
015D: set_gamespeed 1.0
wait 300
0AAD: set_mp3 6@ perform_action 0
jump @NFSHUD_15

//God Mode ON/OFF
:NFSHUD_105
wait 0
03F0: enable_text_draw 0
if
10@ == 0
then
    10@ = 1
    03E5: show_text_box 'GOD_ON'
else
    10@ = 0
    03E5: show_text_box 'GOD_OFF'
end
02AC: set_vehicle 1@ immunities_to_BP 10@ FP 10@ EP 10@ DP 10@ WO_or_AP 10@
03AB: set_vehicle 1@ strong 10@
018C: play_sound 1058 at 0.0 0.0 0.0
wait 2500
jump @NFSHUD_276

//Meter Reset ("G"Key)
:NFSHUD_902
wait 0 
03F0: enable_text_draw 0 
0391: release_txd_dictionary 
jump @NFSHUD_15 

//Exit Car
:NFSHUD_919
21@ = 0
03C7: set_sensitivity_to_crime_to 1.0 
03F0: enable_text_draw 0 
0391: release_txd_dictionary
16@ = 0
if
    10@ == 1
then
02AC: set_vehicle 1@ immunities_to_BP 0 FP 0 EP 0 DP 0 WO_or_AP 0
03AB: set_vehicle 1@ strong 0
10@ = 0
03E5: show_text_box 'GOD_EXT'
018C: play_sound 1058 at 0.0 0.0 0.0
wait 1000
end 
jump @NFSHUD_15
 
